/** 
 * @date 06/05/2013
 * @author Renet_Pourriau
 * @version 1.0
 */

package adresse;

/**
 * This class represent City
 */
public class Ville {

	private String nomVille;

	private PaysC pays;

	/**
	 * this is the constructor of City
	 * @param nomVille
	 */
	public Ville(String nomVille) {
		this.setNomVille(nomVille);
	}

	/**
	 * @return the nomVille
	 */
	public String getNomVille() {
		return nomVille;
	}

	/**
	 * @param nomVille
	 *            the nomVille to set
	 */
	public void setNomVille(String nomVille) {
		this.nomVille = nomVille;
	}

	/**
	 * @return the pays
	 */
	public PaysC getPays() {
		return pays;
	}

	/**
	 * @param pays
	 *            the pays to set
	 */
	public void setPays(PaysC pays) {
		this.pays = pays;
	}

	/**
	 * @return true if city is capital of the country
	 */
	public boolean estCapital() {
		return this.getNomVille().equals(this.getPays().getCapital().getNomVille());
	}

}